package GUI.MenuBar;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;   

import javax.swing.*;

public class NewMenuBar extends JMenuBar {
	
	private JMenu Control = new JMenu("Control");
	private JMenu Options = new JMenu("Options");
	private JMenu Help = new JMenu("Help");
	private JMenuItem Exit = new JMenuItem("Exit");
	
	private ActionListener ExitItemPress = new ActionListener() {

		public void actionPerformed(ActionEvent e) {
			// TODO Auto-generated method stub
			System.exit(0);
		}
		
	};
	
	public NewMenuBar() {
		
		Exit.addActionListener(ExitItemPress);
		
		Control.add(Exit);
		Options.add(new JMenuItem("URL Option"));
		Help.add(new JMenuItem("Version"));
		
		this.add(Control);
		this.add(Options);
		this.add(Help);
		this.setVisible(true);
	}

}
